from rai.tagger.sentenceparser import *
from sets import Set
from rai.sem.FOL import *
#from test.sem.testFOL import *


   
print "START"
#question = "Who is not in Noosa"
#question = "Mary chases John"
#question = "Who does Mary chase"
#question = "Who is not in the kitchen"
#question = "Who is in the kitchen"
#question = "Who performs Hamlet"
question = "Who knows Suzie"
#question = "every boy chases a girl in Noosa"

world = World()
parser = SentenceParser()
#fact = "Suzie is in the kitchen"
fact = "Suzie performs Hamlet"
parsed_sentence = parser.parseSentence(fact)
print "parsed_sentence:"+str(parsed_sentence)
print parser.formatParsedSentence(parsed_sentence)
    #print chunk[1:]
#parsed_sentence = parser.parseSentence(fact)
#print "RES:"+str(parsed_sentence)
#world.answerQuestion(question)
world.addFact(parsed_sentence)
world.answerQuestion(question)


    
#print grammar

#print dom4
#print val4



    